home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / PowerD / mmu / examples / cpu3.d next >
Encoding:
Text File  |  2002-10-28  |  1.5 KB  |  62 lines

  1. // CPU & FPU Example V0.5 by DMX © 2002
  2. OPT DOSONLY
  3.  
  4. MODULE '680x0','libraries/680x0'
  5.  
  6. DEF MC680x0Base:PTR TO MC680x0Base
  7.  
  8. PROC main()
  9.  
  10.   IF (MC680x0Base:=OpenLibrary('680x0.library',40))
  11.   PrintF('CPU: ')
  12.   SELECT (CPUType())
  13.           CASE CPUTYPE_68000
  14.                   PrintF('68000')
  15.           CASE CPUTYPE_68010
  16.                   PrintF('68010')
  17.           CASE CPUTYPE_68020
  18.                   PrintF('68020')
  19.           CASE CPUTYPE_68030
  20.                   PrintF('68030')
  21.           CASE CPUTYPE_68040
  22.                   PrintF('68040')
  23.           CASE CPUTYPE_68060
  24.                   PrintF('68060')
  25.           DEFAULT
  26.                   PrintF('unknown')
  27.   ENDSELECT
  28.   PrintF('  FPU: ')
  29.   SELECT (FPUType())
  30.           CASE FPUTYPE_NONE
  31.                   PrintF('no FPU')
  32.           CASE FPUTYPE_68881
  33.                   PrintF('68881')
  34.           CASE FPUTYPE_68882
  35.                   PrintF('68882')
  36.           CASE FPUTYPE_68040
  37.                   PrintF('68040')
  38.           CASE FPUTYPE_68060
  39.                   PrintF('68060')
  40.           DEFAULT
  41.                   PrintF('unknown')
  42.   ENDSELECT
  43.   PrintF('  MMU: ')
  44.   SELECT (MMUType())
  45.           CASE MUTYPE_NONE
  46.                   PrintF('no MMU')
  47.           CASE MUTYPE_68851
  48.                   PrintF('68851')
  49.           CASE MUTYPE_68030
  50.                   PrintF('68030')
  51.           CASE MUTYPE_68040
  52.                   PrintF('68040')
  53.           CASE MUTYPE_68060
  54.                   PrintF('68060')
  55.           DEFAULT
  56.                   PrintF('unknown')
  57.   ENDSELECT
  58.   PrintF('\n')
  59.   CloseLibrary(MC680x0Base)
  60.   ENDIF
  61. ENDPROC
  62.